<%= form_for(@reward) do |f| %>
  <% if @reward.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@reward.errors.count, "error") %> prohibited this reward from being saved:</h2>

      <ul>
      <% @reward.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>


  <div class="field">
    <%= f.label :description %>
    <%= f.text_area :description %>
  </div>

  <div class="field">
    <%= f.label :image %>
    <%= f.file_field :image %>
  </div>

  <div class="field">
    <%= f.label :price_in_points %>
    <%= f.number_field :price_in_points %>
  </div>

  <div class="field">
    <%= f.label :point_kind %>
    <%= f.select(:point_kind_id, @point_kinds) %>
  </div>

  <div class="field">
    <%= f.label :user_limit %>
    <%= f.number_field :user_limit %>
  </div>

  <div class="field">
    <%= f.label :expiration_date %>
    <%= f.date_select :expiration_date %>
  </div>

  <div class="field">
    <%= f.label :sponsor_id %>
    <%= f.select(:sponsor_id, @users) %>
  </div>
  
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
